[mirrors]
http://tukaani.org/xz/xz-5.2.2.tar.xz

[vars]
filesize=1016404
sha512=949ef90669a31b9855c5328d7f9d7e2e537c8072b700b1d2f5d69c307eb7f7635a2a4b1b5bb1bb300fba9429355a6d8935b803c505be5c0104bda9e81d0cf477

[deps.host]
dynamic-toolchain

[build]
printf "all:\n\ttrue\n\ninstall:\n\ttrue\n\n" > tests/Makefile.in
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine)"
# the stage0 arm toolchain has a slightly broken libgcc (with external deps to libc)
# this package is the only one that fails to build.
# so let it depend on the stage1 toolchain. another fix could be to add -lc at the
# end of the gcc invocation in musl-gcc.
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
    --disable-nls --with-pic --enable-shared \
    --enable-static $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
